package com.example.springboot.web.controller.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;

/**
 * @author lei yu
 * @date 2024/05/20
 */
@Data
@Schema(description = "创建自定义菜单-请求VO")
public class WxMenuReqVO {
    /**
     * <pre>
     * 菜单的响应动作类型.
     * view表示网页类型，
     * click表示点击类型，
     * miniprogram表示小程序类型
     * </pre>
     */
    @Schema(description = "菜单的响应动作类型", requiredMode = Schema.RequiredMode.AUTO, example = "click")
    @NotBlank(message = "type不能为空")
    private String type;

    /**
     * 菜单标题，不超过16个字节，子菜单不超过60个字节.
     */
    @Schema(description = "菜单标题", requiredMode = Schema.RequiredMode.REQUIRED, example = "今日歌曲")
//    @NotBlank(message = "name不能为空")
    private String name;

    /**
     * <pre>
     * 菜单KEY值，用于消息接口推送，不超过128字节.
     * click等点击类型必须
     * </pre>
     */
    @Schema(description = "菜单KEY值", requiredMode = Schema.RequiredMode.AUTO, example = "V1001_TODAY_MUSIC")
//    @NotBlank(message = "key不能为空")
    private String key;

    /**
     * <pre>
     * 网页链接.
     * 用户点击菜单可打开链接，不超过1024字节。type为miniprogram时，不支持小程序的老版本客户端将打开本url。
     * view、miniprogram类型必须
     * </pre>
     */
    @Schema(description = "网页链接", requiredMode = Schema.RequiredMode.AUTO, example = "http://www.soso.com/")
//    @NotBlank(message = "url不能为空")
    private String url;

    /**
     * <pre>
     * 调用新增永久素材接口返回的合法media_id.
     * media_id类型和view_limited类型必须
     * </pre>
     */
    @Schema(name = "mediaId", description = "调用新增永久素材接口返回的合法media_id", example = "PhFDFCn7LT3h2KcMUmjir", requiredMode = Schema.RequiredMode.AUTO)
//    @NotBlank(message = "mediaId不能为空")
    private String mediaId;

    /**
     * <pre>
     * 调用发布图文接口获得的article_id.
     * article_id类型和article_view_limited类型必须
     * </pre>
     */
    @Schema(name = "articleId", description = "调用发布图文接口获得的article_id", example = "y8qt7xPHEh9DR4w0vHE72", requiredMode = Schema.RequiredMode.AUTO)
//    @NotBlank(message = "articleId不能为空")
    private String articleId;

    /**
     * <pre>
     * 小程序的appid.
     * miniprogram类型必须
     * </pre>
     */
    @Schema(description = "小程序的appid", requiredMode = Schema.RequiredMode.AUTO, example = "wx286b93c14bbf93aa")
//    @NotBlank(message = "appid不能为空")
    private String appid;

    /**
     * <pre>
     * 小程序的页面路径.
     * miniprogram类型必须
     * </pre>
     */
    @Schema(name = "pagePath", description = "小程序的appid", requiredMode = Schema.RequiredMode.AUTO, example = "wx286b93c14bbf93aa")
//    @NotBlank(message = "name不能为空")
    private String pagePath;
}
